package dex.micros_gdc

import java.util.Date;

class Task {

	String projectName
	String activityNumber
	String feedbackNumber
	String description
	String priority
	String documentType
	Date receivedDate
	Date dueDate
	Date completedDate
	String status
	String rootCause
	String developer
	String tester
	int ptsHour
	int estimateHour
	String comments
	String closedFlag
	String risk
	String testByGDCFlag
	String actionType

	static constraints = {
		projectName(blank:false, nullable: false)
		activityNumber(blank:false, nullable: false)
		feedbackNumber(nullable:true)
		description(blank:false, nullable: false)
		priority(blank:false, nullable: false, inList: ["Low", "High"])
		documentType(blank:false, nullable: false, inList: ["SD", "TDD"])
		receivedDate(blank:false, nullable: false)
		dueDate(blank:false, nullable: false)
		completedDate(nullable:true)
		status(nullable:true, inList: [
			"Reviewing",
			"Design",
			"Clarification",
			"Cannot Repro",
			"Testing",
			"Cancelled",
			"Fixed",
			"On Hold"
		])
		rootCause(nullable:true, inList: [
			"Base Bug",
			"Data Issue",
			"DTV Feedback",
			"FRD MU",
			"Insufficient UT",
			"Req Changes"
		])
		ptsHour(blank:true, nullable:true)
		estimateHour(blank:true, nullable:true)
		developer(nullable:true)
		tester(nullable:true)
		comments(nullable:true)
		closedFlag(blank:false, nullable:false, inList: ["N", "Y"])
		risk(nullable:true)
		testByGDCFlag(blank:false, nullable:false, inList: ["Y", "N"])
		actionType(nullable:true, inList: ["C", "E"])
	}

	static mapping = {
		table 'mgtm_task'

		id generator: 'assigned'

		projectName(column: 'project_name')
		activityNumber(column: 'activity_number')
		feedbackNumber(column:'feedback_number')
		description(column: 'description')
		priority(column:'priority')
		documentType(column: 'document_type')
		receivedDate(column:'received_date', type: 'date')
		dueDate(column:'due_date', type: 'date')
		completedDate(column:'completed_date', type: 'date')
		status(column:'status')
		rootCause(column:'root_cause')
		developer(column:'developer')
		tester(column:'tester')
		ptsHour(column:'pts_hour', type: 'int')
		estimateHour(column:'estimate_hour', type: 'int')
		comments(column: 'comments')
		closedFlag(column:'closed_flag')
		risk(column: 'risk')
		testByGDCFlag(column:'test_by_gdc_flag')
		actionType(column:'action_type')
		version true
	}
}
